#!/bin/bash
# auto add user
# must @root

if [ $# -eq 0 ];
then
    echo "command like :$ bash create_user.sh [user1] [user2] ..."
    exit
fi

groupadd auto_set

for i in $*
do
    adduser -g auto_set $i && echo "Enter the password for $i:" && passwd --stdin $i
done